Skip to content

Fix camera vertical movement to use local up vector#15

Merged
gdtknight merged 1 commit intomainfrom
develop
Mar 27, 2026
Merged

Fix camera vertical movement to use local up vector#15
gdtknight merged 1 commit intomainfrom
develop

Conversation

@gdtknight
Copy link
Copy Markdown
Owner

Description

카메라 Q/Z 키 수직 이동 시 고정된 월드 Y축 대신 카메라의 로컬 up 벡터를 사용하도록 수정

Related Issue

없음

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Build/CI improvement

Changes

  • Q/Z 키 이동 방향을 (0, ±step, 0) 고정값에서 카메라 기준 up 벡터(right × direction)로 변경
  • t_vec3 up 변수 추가, vec3_crossvec3_normalize를 활용한 로컬 up 축 계산
  • right 벡터 초기화를 compound literal 방식으로 간결하게 정리

Testing

Test Environment

  • OS: Linux (Ubuntu)
  • Compiler: cc (gcc)

Test Steps

  1. make all 빌드 성공 확인
  2. norminette src/input/input_camera.c 통과 확인
  3. 카메라가 기울어진 상태에서 Q/Z 키로 이동 시 카메라 로컬 축 기준으로 상하 이동되는지 확인

Test Results

  • All existing tests pass
  • New tests added and passing
  • Manual testing completed
  • Norminette check passed
  • No memory leaks (valgrind/leaks)

Screenshots

해당 없음

Checklist

  • Code follows project style guidelines (norminette)
  • Self-review of code completed
  • Comments added for complex logic
  • Documentation updated (if needed)
  • No new warnings generated
  • Tests added for new functionality
  • All tests passing locally
  • Branch is up to date with base branch
  • Commit messages follow conventional format
  • No sensitive data included

Constitution Compliance

  • 42 Norminette compliance verified
  • Code readability prioritized
  • Unit tests created and passing
  • Documentation updated (English + Korean if applicable)
  • Build verification completed
  • Git branch strategy followed
  • Logs stored in logs/ directory

Performance Impact

  • No performance impact
  • Performance improved
  • Performance decreased (justified below)

Additional Notes

기존 고정 Y축 이동은 카메라가 기울어진 상태에서 직관적이지 않은 이동 방향을 제공했습니다. 이 수정으로 카메라 방향에 따라 자연스러운 상하 이동이 가능합니다.

🤖 Generated with Claude Code

Q/Z keys now move along the camera's local up axis (cross product of
right and direction) instead of the fixed world Y axis.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gdtknight gdtknight merged commit 3298d19 into main Mar 27, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant